package com.sqllog.entity;

import com.alibaba.otter.canal.protocol.CanalEntry;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * 事件信息
 *
 * @author chennengcheng
 * @date 2022-01-12 10:33
 * @remark
 */

@Getter
@Setter
public class RowChangeInfo implements Serializable {

    private String host;

    /**
     * 实例名
     */
    private String destination;

    /**
     * 数据库名
     */
    private String schemaName;

    /**
     * 表名
     */
    private String tableName;

    /**
     * 行变更信息
     */
    private CanalEntry.RowChange rowChange;

    public RowChangeInfo(String host, String destination, String schemaName, String tableName, CanalEntry.RowChange rowChange) {
        this.host = host;
        this.destination = destination;
        this.schemaName = schemaName;
        this.tableName = tableName;
        this.rowChange = rowChange;
    }
}
